<?php 
/**
 * 
 */
class Location_model extends CI_model {
	
	function __construct() {
		parent::__construct();
		$this->load->database();
	}
	function getfromcat($catid){
		$this->db->select('id,name,address,share');
		$this->db->from('location');
		$this->db->where('catid',$catid);
		$query = $this->db->get();
		return $query->result_array();
	}
}

?>